/**
 * @Author Puzzle
 * @Date 2022/6/13 4:11 下午
 **/

package request

import (
	"zsc-boot/app/system_layer/model"
	"zsc-boot/core"
)

type LoginReq struct {
	Login     string `json:"login" form:"login"`         // 账号
	Password  string `json:"password" form:"password"`   // 密码
	Captcha   string `json:"captcha" form:"captcha"`     // 验证码
	CaptchaId string `json:"captchaId" form:"captchaId"` // 验证码ID
}

type BatchUpdateUserReq struct {
	UserIds     []uint  `json:"userIds" gorm:"-"`
	IsActive    *bool   `json:"isActive" gorm:"column:is_active;comment:是否在职(是、否);default:true"`
	CustomerCap *uint16 `json:"customerCap" gorm:"column:customer_cap;default:0;comment:客户容量"`
}

type ServiceUsersSearch struct {
	core.PageInfo
	model.ServiceUser
	StartDate string `json:"startDate" form:"startDate" ` //开始时间
	EndDate   string `json:"endDate" form:"endDate" `     // 结束时间
	IsActive  *bool  `json:"isActive" form:"isActive" gorm:"column:is_active;comment:是否在职(是、否);default:true"`
	NotDep    bool   `json:"notDep" form:"notDep"`
}

type LoginLogListReq struct {
	core.PageInfo
	UserName        string `json:"userName" form:"userName" `
	DepId           uint   `json:"depId" form:"depId" `
	CreateStartDate string `json:"createStartDate" form:"createStartDate" `
	CreateEndDate   string `json:"createEndDate" form:"createEndDate" `
}

type UpdatePasswordReq struct {
	ID       uint   `json:"Id" `      //记录id
	Password string `json:"password"` //密码
}

type OldToNewResp struct {
	ID          uint   `json:"Id" form:"ID" `                   //记录id
	OldPassword string `json:"oldPassword" form:"oldPassword" ` //旧密码
	NewPassword string `json:"newPassword" form:"newPassword" ` //旧密码
}

type UpdateUserReq struct {
	model.ServiceUser
	DepId *uint `json:"depId" form:"depId" gorm:"column:dep_id;comment:部门id;"`
}
